def reverseWords(input):
    # 通过空格将字符串分隔开
    inputWords = input.split(" ")

    # 翻转字符串
    inputWords = inputWords[-1::-1]

    # 重新组合字符串
    return " ".join(inputWords)

if __name__ == "__main__":
    print(reverseWords("I am a student"))